<table class="table table-hover">
    <thead>
    <tr>
        @foreach($headers as $filed => $item)
        <th>{{ $item['title'] }}</th>
        @endforeach
    </tr>
    <tr style="color:#f56f9c">
        @foreach($headers as $filed => $item)
            @if($filed == 'settlement_id')
                <td>TTL</td>
            @elseif($item['sumField'])
                <td>{{ round($total->{$filed} ?? 0,3) }}</td>
            @else
                <td></td>
            @endif
        @endforeach
    </tr>
    </thead>
    <tbody>
    @foreach($paginator as $row)
        <tr>
            <td>{{ $row->settlement_id }}</td>
            <td>{{ \App\Models\Basics\SysPlatAccount::getAccountById($row->account_id) }}</td>
            <td>{{ \App\Models\Basics\SysArea::getSysAreaById($row->area_id) }}</td>
            <td>{{ \App\Models\SalesReport\FBADeposit::getCountryById($row->country_id) }}</td>
            <td><span class="label" style="color: #000;font-weight: 500;font-size: 85%;padding: .2em 0 .3em;">{{ $row->deposit_date }}</span></td>
            <td>{{ $row->currency }}</td>
            <td>{{ $row->rate_odds }}</td>
            <td>{{ $row->total_amount }}</td>
            <td>{{ round($row->rate_odds * $row->total_amount,3) }}</td>
{{--            <td>{{ $row->pre_reserve_amount_balance }}</td>--}}
{{--            <td>{{ round($row->rate_odds * $row->pre_reserve_amount_balance,3) }}</td>--}}
            <td>{{ $row->cur_reserve_amount }}</td>
            <td>{{ round($row->rate_odds * $row->cur_reserve_amount,3) }}</td>
            <td><span class="label" style="color: #000;font-weight: 500;font-size: 85%;padding: .2em 0 .3em;">{{ $row->settlement_sdate }}</span></td>
            <td><span class="label" style="color: #000;font-weight: 500;font-size: 85%;padding: .2em 0 .3em;">{{ $row->settlement_edate }}</span></td>
        </tr>
    @endforeach
    </tbody>
</table>
